gint offset)
{
GtkMenuPrivate *priv = menu->priv;
- GtkAllocation allocation;
GtkBorder arrow_border, padding;
GtkWidget *widget;
gint x, y;
gtk_adjustment_set_value (priv->tearoff_adjustment, offset);
/* Move/resize the viewport according to arrows: */
- gtk_widget_get_allocation (widget, &allocation);
- view_width = allocation.width;
- view_height = allocation.height;
+ view_width = gtk_widget_get_allocated_width (widget);
+ view_height = gtk_widget_get_allocated_height (widget);
gtk_widget_style_get (GTK_WIDGET (menu),
"vertical-padding", &vertical_padding,
gdk_window_get_origin (window, x, y);
- gtk_widget_get_preferred_size (GTK_WIDGET (menu),
- &menu_req, NULL);
+ menu_req.width = gtk_widget_get_allocated_width (GTK_WIDGET (menu));
+ menu_req.height = gtk_widget_get_allocated_height (GTK_WIDGET (menu));
gtk_widget_get_allocation (widget, &allocation);
if (_gtk_tray_icon_get_orientation (tray_icon) == GTK_ORIENTATION_VERTICAL)